#include<backend.h>
#define  _DEFAULT_SOURCE
#include<sys/mman.h>
#include<stdlib.h>
#include <unistd.h>
struct segment_t* segment_alloc(struct heap_t* heap, size_t block_size){
    void *p =  mmap(NULL,4,PROT_READ|PROT_WRITE,MAP_ANONYMOUS|MAP_SHARED,-1,0);
    if (p==MAP_FAILED){
        exit(-1);
    }
    return p;
}////

int segment_free(void *p){
    if(likely(munmap(p, 4) == 0)){
       return 0;
    }else{
        exit(-1);
        return -1;
    }
}